/**
  SUNNY Project, Anyang Normal University, IMP-CAS
  \class TAPicMat
  \brie visualize the matrix in a picture. Mainly this is a class to show the
  structure of a large sparse matrix, which is not eligible to show in a terminal
  \author SUN Yazhou, asia.rabbit@163.com
  \since 2022/11/28
  \date Last modified: 2022/11/28 by SUN Yazhou
  \copyright 2020-2023 SUN Yazhou
  \copyright SUNNY project, Anyang Normal University, IMP-CAS
*/

#ifndef _TAPicMat_h_
#define _TAPicMat_h_

#include <string>
#include <vector>
#include "config.h" // contains user switch of definition of ROOT and OpenCV

#ifdef _OpenCV_
#include <opencv4/opencv2/opencv.hpp>
#endif

using std::string;
using std::vector;

#ifdef _OpenCV_
class TAPicMat : public cv::Mat{
#else
class TAPicMat{
#endif
public:
  TAPicMat(int nr, int nc);
  virtual ~TAPicMat();

  void SetPixelWhite(int r, int c);
  void SetPixelGreen(int r, int c);

  /// \param name: window name
  void Show(const string &name = "matrix"); ///< show the picture

  static std::vector<int> REALPNG;
};

#endif // end #ifdef _OpenCV_
